package com.tencent.wxcloudrun.service.impl;

import com.tencent.wxcloudrun.dto.CouponsRequest;
import com.tencent.wxcloudrun.dto.MyCoupons;
import com.tencent.wxcloudrun.mapper.CouponsMapper;
import com.tencent.wxcloudrun.model.Coupons;
import com.tencent.wxcloudrun.service.CouponsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author lichongbing
 * @version 1.0.0
 * @createdate 2023/3/11 21:43
 * @description: TODO
 */
@Service
public class CouponsServiceImpl implements CouponsService {

    @Autowired
    private CouponsMapper couponsMapper;


    @Override
    public List<Coupons> getCoupons(String openid) {
        List<Coupons> coupons = couponsMapper.getCoupons();

        return coupons;
    }

    @Override
    public List<MyCoupons> myCoupons(String openid) {
        return couponsMapper.myCoupons(openid);
    }

    @Override
    public Coupons checkCoupons(String id) {
        return couponsMapper.checkCoupons(id);
    }

    @Override
    public MyCoupons checkCoupons1(String openid, String id) {
        return couponsMapper.checkCoupons1(openid, id);
    }

    @Override
    public int fetchCoupons(String openid, String id) {
        return couponsMapper.fetchCoupons(openid, id);
    }
}
